#ifndef GLOBALFUNCTIONS_H
#define GLOBALFUNCTIONS_H
#include "..\Shered\Object.h"
#include <sstream>
#include <string>
using namespace std;
// global functions for intersil project
#define  stringToInt_ErrCode   -858993460
string boolToStr(bool b);
string USER_PERMISSION_LEVEL_TO_STRING(int i);
string USER_TYPE_TO_STRING(int i);
int USER_PERMISSION_TO_INT(string userType);
int USER_TYPE_TO_INT(string userType);
string MESSAGE_TYPE_TO_STRING(int msgtype);
string intToString(int num);
int stringToInt(string numstr);
bool intBetween(int num,int min,int max);
int max(int a,int b);


enum USER_PERMISSION_LEVEL{NONE=1,STUDENT=2,LECTURER=3,ADMINISTRATOR=4};
enum USER_TYPE{TYPE_NONE=1,TYPE_STUDENT=2,TYPE_LECTURER=3,TYPE_ADMINISTRATOR=4};


#endif // GLOBALFUNCTIONS_H